package View;

import javax.swing.*;
import java.awt.*;

public class BeginView {
    //游戏模式
    private int modeloption = -1;

    public BeginView(){}

    public void display(){
        // 设置按钮字体
        Font buttonFont = new Font(null, Font.BOLD, 12);
        UIManager.put("Button.font", buttonFont);

        Object[] options = {"双人对决","人机对战","机机互奕"};

        JLabel message = new JLabel("请选择模式:");
        message.setFont(new Font(null,Font.BOLD,16));

        modeloption = JOptionPane.showOptionDialog(
          null,
          message,
          "提示",
          JOptionPane.DEFAULT_OPTION,
          JOptionPane.PLAIN_MESSAGE,
          null,
          options,
          null
        );
        
    }

    public int getModeloption(){return modeloption;}
}
